// Listing 17.8 -Using ignore()
#include <iostream>
using namespace std;

int main(void)
{
    char stringOne[256];
    char stringTwo[256];

    cout << "Enter string one: ";
    cin.getline(stringOne, 256);
    cout << "String One: "<< stringOne << endl;

    cout << "Enter string two: ";
    cin.getline(stringTwo, 256);
    cout << "String Tow: " << stringTwo << endl;

    cout << "\n\nNow try again..\n";

    cout << "Enter string one: ";
    cin.get(stringOne, 256);
    cout << "String One: " << stringOne << endl;

    cin.ignore(256, '\n');

    cout << "Enter string two: ";
    cin.getline(stringTwo, 256);
    cout << "String Two: " << stringTwo << endl;
}